package org.xhystudy.rpc.registry.loadbalancer;

/**
 * @description:
 * @Author: Xhy
 * @gitee: https://gitee.com/XhyQAQ
 * @copyright: B站: https://space.bilibili.com/152686439
 * @CreateTime: 2023-04-30 21:57
 */
public enum  LoadBalancerType {
    CONSISTENT_HASH,
    RoundRobin;

    public static LoadBalancerType toLoadBalancer(String loadBalancer){
        for (LoadBalancerType value : values()) {
            if (value.toString().equals(loadBalancer)) {
                return value;
            }
        }
        return null;
    }
}
